<?php
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'list';
cfc('core')->checklogin();
if($_RQ['op']=='list'){
	$pindex = max(1, intval($_RQ['page']));
	$psize = 15;
	$params=array('uniacid'=>$_SESSION['uniacid'],'status <>'=>1);
    $orderby='createtime desc';
	$total='';
	$return['list']=pdo_getslice('jy_mapfuwu_worker',$params,array($pindex,$psize),$total,$fields,'',$orderby);	
	if($return['list']){
		foreach($return['list'] as &$v){
			$v['avatar']=tomedia($v['avatar'],true);
			$v['createtime']=date('Y-m-d H:i:s',$v['createtime']);
		}
	}
	$return['status']=array('1'=>'已审核','0'=>'待审核','2'=>'已驳回');
	$return['stop']=array('1'=>'是','0'=>'否');
	$return['online']=$this->online;
	$return['gender']=array('1'=>'男','2'=>'女');
	$return['post']=array('status'=>1);
	exi($return);
}
if($_RQ['op']=='stop'){
	$id=intval($_RQ['id']);
	$type=intval($_RQ['type']);
	if($id){
		pdo_update('jy_mapfuwu_worker',array('stop'=>$type),array('id'=>$id));
	}
	exi($type?'禁号成功！':'恢复成功！','','jy_mapfuwu/shenhe/list/');
}
if($_RQ['op']=='set'){
	$id=intval($_RQ['id']);
	$status=intval($_RQ['status']);
	if($id){
		pdo_update('jy_mapfuwu_worker',array('status'=>$status),array('id'=>$id));
	}
	exi('审核操作成功！','','jy_mapfuwu/shenhe/list/');
}
?>